﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;
using Chowpoo.Sql;

namespace CourseSystem.Core.Entities
{
    [Table(Name = "InternetResources")]
    public class InternetResourcesInfo : IDetach 
    {
        public InternetResourcesInfo()
        {
            Detach();
        }
        #region Model
        private int _id;
        private string _name = "";
        private string _link = "";


        [Column(IsDbGenerated = true, IsPrimaryKey = true, IsVersion = true)]
        public int Id
        {
            set { _id = value; }
            get { return _id; }
        }

        /// <summary>
        /// 
        /// </summary>
        [Column]
        [DisplayName("资源名称")]
        [Required(ErrorMessage="必须填写")]
        public string Name
        {
            set { _name = value; }
            get { return _name; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        [DisplayName("资源地址")]
        [Required(ErrorMessage = "必须填写")]
        public string Link
        {
            set { _link = value; }
            get { return _link; }
        }
        #endregion Model

        public void Detach()
        {

        }
    }
}
